﻿<%@ page contentType="text/html; charset=utf-8" language="java" %>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link type="text/css" rel="stylesheet" href="css/style.css" />
<title>查看留言</title>
</head>

<body>
<c:if test="${requestScope.content!=null}">
	<div id="head">
		<h1>JSP+Servlet+Bean 留言本</h1>
	</div>
	<div id="nav">
		您的位置：<a href="index.jsp">首页</a> &gt;&gt; 查看留言
	</div>
	<div id="main">
		<c:forEach var="view" items="${requestScope.content}">
			<ul>
			<li>标题：${view.title}</li>
			<li>
				<dl>
					<dt>${view.user}</dt>
					<dd style="border-bottom:1px solid #09c">${view.content}</dd>
					<dd>发表时间：${view.posttime}</dd>
				</dl>
			</li>
			<li>管理员回复：${view.replaytxt}</li>
			</ul>
		</c:forEach>
		<c:if test="${sessionScope.admin!=null}">
		<div id="replay_form">
			<form method="post" action="Do">
			请输入要回复的内容：<input type="text" name="replay_txt" size="50" />
			<input type="submit" value="回复" />
			<input type="hidden" name="id" value="<%=request.getParameter("id")%>" />
			</form>
		</div>
		</c:if>
	
	</div>
	<div id="foot">
		power by diplodocus
	</div>
</c:if>
</body>
</html>
